<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        <style type="text/css">
            #ui-datepicker-div
            {
                z-index: 9999999;
            }

            .rich-mpnl-body{
                padding: 0;
            }
        </style>

    </head>



    <script type="text/javascript">
        $j(document).ready(function(){
            initThickBox('.thickbox');
            
            $j('.checkfornew').live('click',function(){
                //    $j(".abc").trigger("click");
                $j( "#toggle" ).hide();
                var lang= $j(this).attr("lang");
                var boool;
                if( $j(this).is(":checked"))
                {
                    boool = true;
                }
                else
                {
                    boool = false;
                }
                            
                $j.post("listcustomer4tourmew.jsp?action=addpersonalforV180&pn100="+lang+"&valueC="+boool,function(data){
                            
                });

            });
                    
            $j(".checkfornewAll").live("click",function(){
                       
                flag = $j('.checkfornewAll').is(':checked');
                       
                $j(".checkfornew").each(function(){
                    $j('.checkfornew')  .attr('checked', flag);
                });
                        
                var boool;
                if( $j(this).is(":checked"))
                {
                    boool = true;
                }
                else
                {
                    boool = false;
                }
                        
                $j.post("listcustomer4tourmew.jsp?action=addAllpersonalforV180&boool="+boool,function(data){
                            
                });

            });
            
            $j( ".displaySMS" ).click(function() {
                $j( "#togglesms" ).show();
                $j( "#togglesms" ).animate({height:'auto',opacity:'0.9'},"slow");
                $j( "#togglesms" ).animate({width:'39%',opacity:'0.9'},"slow");
                var info = $j(this).attr('lang');
                $j.post("SgtSMS.jsp?"+info,function(data){
                    if(data!=null){
                        $j( "#togglesms" ).html(data);
                    }
                });
            });
                    
         
        });
    </script>
    <body>
        <f:view>
            <div id="togglesms">

            </div>

            <a4j:status onstart="#{rich:component('statPane')}.show()" onstop="#{rich:component('statPane')}.hide()" />
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <a4j:form id="formV180">
                <div class="content_detail">
                    <div class="list_item_user" style="margin: 3px 0;">
                        <div class="item_content" style="display: block">
                            <div class="infomation_form">
                                <h:inputHidden value="#{v030Controller.FV050}"/>
                                <div style="float:left ; width:100%;">
                                    <div style="float:left;width:96%;margin-left: 2%;">

                                        <%--   <a4j:commandLink styleClass="no-decor" reRender="confirmPane4tour"  oncomplete="#{rich:component('confirmPane4tour')}.show()">
                                              <div style="float: left;border: 1px solid #666666;width: 2%;background-color: #506579;color: #fff;">
                                                  <h:outputText style="float:left;line-height:15px;margin-left:7%;font-size:9px" value="ADD"/>

                                            </div>
                                            <div style="float: left;border: 1px solid #666666;width: 2%;background-color: #506579;color: #fff;">
                                                <h:outputText style="float:left;line-height:15px;margin-left:21%;font-size:17px" value="+"/>
                                            </div>
                                            <f:param value="showlistfortour" name="action"/>
                                            <f:param name="fv050" value="#{v030Controller.FV050}"/>
                                        </a4j:commandLink> 
                                        <a4j:commandLink styleClass="no-decor" reRender="confirmPane4tour1"  oncomplete="#{rich:component('confirmPane4tour1')}.show()">
                                            <div style="float: left;border: 1px solid #666666;width: 2%;background-color: #506579;color: #fff;">
                                                <h:outputText style="float:left;line-height:15px;margin-left:7%;font-size:9px" value="ADD"/>

                                            </div>
                                            <div style="float: left;border: 1px solid #666666;width: 2%;background-color: #506579;color: #fff;">
                                                <h:outputText style="float:left;line-height:15px;margin-left:21%;font-size:17px" value="+"/>
                                            </div>
                                        </a4j:commandLink>--%>

                                        <h:outputLink value="addV030forTour.jsp?action=getlistV180&height=282px&width=345px" styleClass="fancybox add_new" id="fancybox9">
                                            <div style="float: left;border: 1px solid #666666;width: 2%;background-color: #506579;color: #fff;">
                                                <h:outputText style="float:left;line-height:15px;margin-left:7%;font-size:9px" value="ADD"/>

                                            </div>
                                            <div style="float: left;border: 1px solid #666666;width: 2%;background-color: #506579;color: #fff;">
                                                <h:outputText style="float:left;line-height:15px;margin-left:21%;font-size:17px" value="+"/>
                                            </div>
                                        </h:outputLink>
                                       <div class="fornewviewSMS" style="float: left;width: 2%;margin-left: 5px;cursor: pointer;">
                                            <h:graphicImage styleClass="displaySMS" lang="page=smsforV180&fk100=#{v180Controller.fv150}" value="../images/viewSMS.png"/>
                                        </div> 
                                    </div>
                                    <div style="float:left; width:96%;margin-left: 2%;">

                                        <h:panelGroup id="listitemV030">
                                            <rich:dataTable  value="#{v180Controller.listoftabv180}" rowKeyVar="row" var="cus" columnClasses="col1"
                                                             reRender="ds"
                                                             rowClasses="blue, white"
                                                             id="abcxyz">
                                                <rich:column> 
                                                    <f:facet name="header">
                                                        <h:outputText value="STT"/>
                                                    </f:facet>
                                                    <div style="width: 20px;text-align: center">
                                                        <h:outputText value="#{row+1} "/>
                                                    </div>

                                                </rich:column>
                                                <rich:column>
                                                    <f:facet name="header">
                                                        <h:selectBooleanCheckbox styleClass="checkfornewAll" value=""/>
                                                    </f:facet>
                                                    <div style="text-align: center;width: 100%;">
                                                        <h:selectBooleanCheckbox lang="#{cus.fn100}" styleClass="checkfornew" value=""/>
                                                    </div>

                                                </rich:column> 
                                                <rich:column> 
                                                    <f:facet name="header">
                                                        <h:outputText value="Họ tên"/>
                                                    </f:facet>
                                                    <div style="text-align: left;">
                                                        <h:outputLink value="customer.jsp?action=linkCus&pnPN100=0&type=0"> <h:outputText value="#{cus.hoten}" /></h:outputLink>
                                                        <%--  <h:panelGroup rendered="#{cus.fn600==1}"><h:outputLink style="color:#E2CC3D;font-weight:bold;" value="employee.jsp?action=linkEmp&pnPN100=#{cus.pn100}"> <h:outputText  value="#{cus.hoten}"/></h:outputLink></h:panelGroup>
                                                          <h:panelGroup rendered="#{cus.fn600==0}"><h:outputLink style="color:#E2CC3D;font-weight:bold;"  value="employee.jsp?action=linkEmp&pnPN100=#{cus.pn100}"> <h:outputText  value="#{cus.hoten}" /></h:outputLink></h:panelGroup>                                                               --%>

                                                    </rich:column>   
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Sinh nhật"/>
                                                        </f:facet>
                                                        <div style="float: left;width: 85%;text-align: center;">
                                                            <h:outputText value="#{cus.nd118}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Giới tính"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nv107}"/>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Nơi sinh"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nv123}"/>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="CMND"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nv351}"/>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Passport"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nv351p}"/>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Ngày cấp PP"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nd352}"><f:convertDateTime pattern="dd/MM/yyyy" /> </h:outputText>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Hết hạn PP"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                           <h:outputText value="#{cus.nd353}"><f:convertDateTime pattern="dd/MM/yyyy" /> </h:outputText>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Mobi"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nv958}"/>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Email"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputText value="#{cus.nv120}"/>
                                                        </div>

                                                    </rich:column> 
                                                    <rich:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Action"/>
                                                        </f:facet>
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:outputLink  value="delete.jsp?id=#{cus.pv150}&id2=#{cus.fn100}&flag=V180&height=150px&width=300px" styleClass="fancybox">
                                                                <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                            </h:outputLink>
                                                            <%-- <a4j:commandLink styleClass="no-decor" reRender="confirmPaneV180"  oncomplete="#{rich:component('confirmPaneV180')}.show()">
                                                                 <h:graphicImage value="/images/delete_1.png" alt="delete" />
                                                                 <f:param value="deleteV180" name="action"/>
                                                                  <f:param name="fn100" value="#{cus.fn100}"/>
                                                                 <f:param name="fv150" value="#{cus.pv150}"/>
                                                             </a4j:commandLink> --%>
                                                        </div>

                                                    </rich:column> 

                                                </rich:dataTable>
                                            </h:panelGroup>

                                        </div>

                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                     height="30" width="40" zindex="2000">
                        <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                    </rich:modalPanel>
                    <rich:modalPanel styleClass="pleaseimage" id="statPane" autosized="true" minHeight="10" minWidth="80"
                                     height="10" width="80" zindex="2000">
                        <h:graphicImage value="/images/loadingAnimation.gif" alt="ai" />
                    </rich:modalPanel>
                    <%--   <rich:modalPanel id="confirmPaneV180" autosized="true">
                           <div class="popup" style="height:150px; width:350px">
                               <div class="popup-header">
                                   <div class="title"><h:outputText value="Thông báo"/></div>
                               </div>
                               <div class="popup-content">
                                   <div class="main_content" style="padding:20px 84px">                                     
                                       <font style="font-weight:bold;margin-left: 6px;">
                                       <h:outputText value="Bạn có muốn xóa dữ liệu này?"/>
                                       </font>                                   
                                   </div>
                               </div>
                               <div class="popup-footer">
                                   <a4j:commandButton styleClass="buttonsave" value="Cancel" onclick="#{rich:component('confirmPaneV180')}.hide(); return false;" />
                                   <a4j:commandButton styleClass="buttonsave" value="Delete" reRender="listitemV030" oncomplete="#{rich:component('confirmPaneV180')}.hide();" actionListener="#{v180Controller.stdv_tools_stornotabv180}"/>                             
                               </div>
                           </div>
                       </rich:modalPanel> 
                       <rich:modalPanel id="confirmPane4tour1" autosized="true">      
                           <div class="popup" style="height:600px; width:800px">
                               <div class="popup-header">
                                   <div class="title"><h:outputText value="DANH SÁCH NGƯỜI THAM GIA TOUR"/></div>
                               </div>
                               <div class="popup-content" >
                                   <div class="main_content">
                                       <div style="width: 100%;height: 500px;overflow: auto;">
                                           <div style="width:90%;float: left;height: 30px;padding: 5px;">
                                               <div style="width: 15%;text-align: right;float: left;">
                                                   <h:outputText value="Tiêu đề :"/>
                                               </div>
                                               <div style="width: 80%;text-align: left;float: left;">
                                                   <h:inputText style="width:70%" value="#{v180Controller.vv181}"/>
                                               </div>
                                           </div>
                                           <div style="width:90%;float: left;height: 30px;padding: 5px;">
                                               <div style="width: 15%;text-align: right;float: left;">
                                                   <h:outputText value="Người tham gia Tour :"/>
                                               </div>
                                               <div style="width: 80%;text-align: left;float: left;">
                                                   <h:selectOneMenu value="#{v180Controller.fn100}">
                                                       <f:selectItems value="#{v180Controller.comboV030Tour}"/>
                                                   </h:selectOneMenu>
                                               </div>
                                           </div>
                                           <div style="width:90%;float: left;height: 30px;padding: 5px;">
                                               <div style="width: 15%;text-align: right;float: left;">
                                                   <h:outputText value="Nội dung :"/>
                                               </div>
                                               <div style="width: 80%;text-align: left;float: left;">
                                                   <h:inputTextarea style="width:70%;height:50px;" value="#{v180Controller.vv182}"/>
                                               </div>
                                           </div>
                                       </div>
                                   </div>
                                   <div class="popup-footer">
                                       <div class="alert"></div>

                                    <a4j:commandButton styleClass="buttonsave" style="margin-right: 33px;" value="Cancel"/>
                                    <a4j:commandButton  reRender="formV180" oncomplete="#{rich:component('confirmPane4tour1')}.hide();" actionListener="#{v180Controller.stdv_tools_inserttabv180}" styleClass="buttonsave" value="SAVE"/>                             
                                </div>

                            </div>
                        </div>
                    </rich:modalPanel>--%>
                </a4j:form>
            </f:view>
    </body>
</html>
<style>
    .fornewviewSMS img{
        height: 17px;
        width: 25px;
    }
</style>